{"schema_version":"1.7.5","id":"CVE-2021-47195","published":"2024-04-10T19:15:47.853Z","modified":"2026-03-15T21:45:13.698722Z","related":["SUSE-SU-2024:1641-1","SUSE-SU-2024:1644-1","SUSE-SU-2024:1647-1","SUSE-SU-2024:1659-1","SUSE-SU-2024:1663-1"],"details":"In the Linux kernel, the following vulnerability has been resolved:\n\nspi: fix use-after-free of the add_lock mutex\n\nCommit 6098475d4cb4 (\"spi: Fix deadlock when adding SPI controllers on\nSPI buses\") introduced a per-controller mutex. But mutex_unlock() of\nsaid lock is called after the controller is already freed:\n\n  spi_unregister_controller(ctlr)\n  -> put_device(&ctlr->dev)\n    -> spi_controller_release(dev)\n  -> mutex_unlock(&ctrl->add_lock)\n\nMove the put_device() after the mutex_unlock().","affected":[{"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-47195.json","unresolved_ranges":[{"events":[{"introduced":"0"},{"fixed":"5.15.5"}]}]}}],"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/11eab327a2a8bd36c38afbff920ae1bd45588dd4"},{"type":"WEB","url":"https://git.kernel.org/stable/c/54c2c96eafcfd242e52e932ab54ace4784efe1dd"},{"type":"FIX","url":"https://git.kernel.org/stable/c/6c53b45c71b4920b5e62f0ea8079a1da382b9434"},{"type":"FIX","url":"https://git.kernel.org/stable/c/37330f37f6666c7739a44b2b6b95b047ccdbed2d"}],"severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"}]}